#include <iostream>
#include <istream>
#include <vector>
using namespace std;

typedef long long ll;
const int MOD = 998244353;

int main() {
    iostream::sync_with_stdio(false);
    cin.tie(nullptr);
    ll n, a, b, c;
    cin >> n >> a >> b >> c;
    

    vector<vector<ll>> C(n+1, vector<ll>(n+1, 0));
    for (int i = 0; i <= n; i++) {
        C[i][0] = 1;
        for (int j = 1; j <= i; j++) {
            C[i][j] = (C[i-1][j-1] + C[i-1][j]) % MOD;
        }
    }
    

    auto S = [&](ll m, ll x) -> ll {
        if (m < 0) return 0;
        ll up = min(m, x);
        ll sum = 0;
        for (int i = 0; i <= up; i++) {
            sum = (sum + C[m][i]) % MOD;
        }
        return sum;
    };
    

    ll ans = 0;
    for (int k = 0; k <= n; k++) {
        ll m = n - k;
        ll t = C[n][k];
        t = t * S(m, a) % MOD;
        t = t * S(m, b) % MOD;
        t = t * S(m, c) % MOD;
        
        if (k % 2 == 1) {
            t = MOD - t; 
        }
        ans = (ans + t) % MOD;
    }
    
    cout << (ans % MOD + MOD) % MOD << endl;
    return 0;
}
